package com.example.struts.actions.globalResult;

import com.opensymphony.xwork2.ActionSupport;

public class UserAction extends ActionSupport {
	
	private int type;

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}
	
	@Override
	public String execute() throws Exception {
		if(type == 0){
			return SUCCESS;
		} else if (type == 1){
			return ERROR;
		} else {
			return "mainPage";
		}
		
	}
}
